package com.tanhua.server.utils;

import com.tanhua.server.pojo.User;

/**
 * @Author: JinboYang
 * @Description:
 * @Date: Created in 下午 14:12 2021/1/7
 * @ModifiedBy:
 */
public class UserThreadLocal {

    private static final ThreadLocal<User> LOCAL=new ThreadLocal<>();

    private UserThreadLocal() {
    }

    public static void set(User user){
        LOCAL.set(user);
    }

    public static User get(){
        return LOCAL.get();
    }
}
